#ifndef IF_MEDIAENGINEINTERFACE_H
#define IF_MEDIAENGINEINTERFACE_H

#include "QObject"

namespace AudioObject
{

typedef enum
{
   LoadingState = 0,
   StoppedState = 1,
   PlayingState = 2,
   BufferingState = 3,
   PausedState = 4,
   ErrorState = 5
} State;

}

class AbstractMediaSource;


class IF_MediaEngineInterface : public QObject
{
   Q_OBJECT
public:
   IF_MediaEngineInterface( QObject *parent) : QObject(parent) {}
   virtual ~IF_MediaEngineInterface() {}

public slots:
   virtual void setCurrentSource( const AbstractMediaSource *source ) = 0;
   virtual void play() = 0;
   virtual void pause() = 0;
   virtual void togglePlayPause() = 0;
   virtual void stop() = 0;
   virtual void rewind() = 0;
   virtual void setVolume(int vol) = 0;
   virtual int volume() = 0;
   virtual void setTickInterval( qint32 tickMs ) = 0;
   virtual AudioObject::State  state() = 0;
   virtual void onUserPositionRequested( qint64 positionMs) = 0;
   virtual void setMuted( bool muted) = 0;

signals:
   void muteStatus( bool);
   void volumeChanged(int);
   void videoAvailableChanged(bool);
   void tick(qint64);
   void stateChanged( AudioObject::State);
   void finished();
   void totalTimeChanged(qint64);
};

#endif // IF_MEDIAENGINEINTERFACE_H
